home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / mac / DirectX SDK / DXSDK / bin / DXUtils / dp8log.txt < prev    next >
Text File  |  2001-10-08  |  5KB  |  115 lines

  1. DIRECTPLAY« 8 LOGGING UTILITY (DP8LOG.EXE)
  2.  
  3. Like many parts of DirectX, the debug version of DirectPlay 8 sends 
  4. debugging messages meant to aid you in development to a debug program. 
  5. DirectPlay is also able to send this debugging information to a region 
  6. of shared memory. The purpose of the dp8log.exe utility is to read and 
  7. display the contents of that region of memory. This allows you to obtain 
  8. the debug information on machines that do not have a debugger and also 
  9. gives you a convenient way to save the debugging information to a file 
  10. by redirecting the output from dp8log.exe to a file.
  11.  
  12. To display the contents of shared memory simply run dp8log.exe from the 
  13. command prompt. The contents of the shared memory will be output to the 
  14. standard output device (the screen). If you want to save the debug 
  15. output to a file, simply redirect standard output to a file. For example, 
  16. the command:
  17.  
  18. dp8log > debug.txt
  19.  
  20. Will save the debug output in a file called debug.txt in the current 
  21. directory.
  22.  
  23. Note that the shared memory region only exists while a DirectPlay 8 
  24. application is running and has loaded one or more of the DirectPlay 8 
  25. dlls. When all DirectPlay applications exit or unload the DirectPlay 8 
  26. dlls, the shared memory region is deallocated. This means that you can 
  27. only get output from dp8log.exe while one or more of the DirectPlay 8 
  28. dlls are loaded (i.e. the application using DirectPlay 8 is running).
  29.  
  30. Also note that all DirectPlay 8 applications share the same area of
  31. shared memory. This means that the debug output will contain output
  32. from all processes using DirectPlay 8.
  33.  
  34. You can change the behavior of the DirectPlay 8 debug output by adding 
  35. entries to win.ini in the windows directory.
  36.  
  37. DirectPlay 8 looks for the [DirectPlay8] section in win.ini, and it 
  38. recognizes the following attributes:
  39.  
  40. debug=x
  41. log=x
  42. debug.<component>=x
  43. log.<component>=x
  44. verbose=x
  45.  
  46. These attributes are described below:
  47.  
  48. debug - determines how much information is sent to the debug log, 0 is 
  49. the least amount (critical errors only), 9 is the most (practically 
  50. everything that DirectPlay does). Note that setting "debug" to a high 
  51. level takes a fair amount of CPU time and will lower the performance 
  52. of your application.
  53.  
  54. DirectPlay is subdivided into a number of components. It is possible to 
  55. control the debug level of individual components. The following 
  56. compoenents are available:
  57.  
  58. core - session layer protocol (e.g. player and group management)
  59. addr - DirectPlay addressing (i.e. IDirectPlay8Address)
  60. lobby - lobby client and lobbied application
  61. protocol - transport protocol (i.e. retries, acks, etc.)
  62. voice - DirectPlay Voice
  63. dpnsvr - the enumeration server/redirector (dpnsvr.exe)
  64. wsock - winsock (IP/IPX) service provider
  65. modem - serial and modem service provider
  66. shared - shared untility functions in DirectPlay
  67.  
  68. The "debug" setting sets the default debug level. You can override this 
  69. with specific component levels, e.g.
  70.  
  71. debug=1 ; sets the default level to 1
  72. debug.voice=5 ; set voice related debug level to 5
  73. debug.wsock=0 ; set the winsock service provider debug level to 0
  74.  
  75. The "log" attribute determines where the debug information is sent.
  76. The following values are valid:
  77.  
  78. log=0 ; send no debug information
  79. log=1 ; send debug info to debug console (i.e vc++ debug window)
  80. log=2 ; send debug info to shared memory
  81. log=3 ; send debug info to both console and shared memory
  82.  
  83. As with the "debug" attribute, you can specify components for the
  84. log attribute. For example:
  85.  
  86. log=1 ; default to sending debug information to the debug console
  87. log.voice=3 ; send voice debug information to console and memory
  88. log.wsock=0 ; send winsock service provider debug information to nowhere
  89.  
  90. The "verbose" attribute determines how much information is contained
  91. in each debug message. There are two verbosity levels, "0" and "1".
  92. "0" is the default. Example:
  93.  
  94. verbose=1 ; sent the verbosity level to 1
  95.  
  96. Experiment with the different verbosity levels and decide which one
  97. serves your purposes best.
  98.  
  99. Here is a complete example win.ini section:
  100.  
  101. [DirectPlay8]
  102. debug=1      ; set the default debug level to 1
  103. debug.core=5 ; set the core debug level to 5
  104. log=1        ; default to sending debug output to console only
  105. log.core=3   ; send the core debug output to both console and memory
  106. verbose=1    ; use verbosity level 1
  107.  
  108. If no [DirectPlay8] section is found in win.ini, DirectPlay defaults
  109. to the following settings:
  110.  
  111. [DirectPlay8]
  112. log=1
  113. debug=0
  114.  
  115. Therefore you will always see critical errors in the debug console.